LIB              = libtext.lib

SOURCES_ASM      = text.asm print_small.asm print_norm.asm print_big.asm \
                   aff_bmp.asm aff_bmp_db.asm aff_bmp_keys.asm \
                   cfile_base.asm g100_fonx.asm

OBJS_lib         = $(SOURCES_ASM:%.asm=%.obj)

RM               = $(EXE_PATH)rm -f
SED              = $(EXE_PATH)sed
SLEEP            = $(EXE_PATH)sleep
LINK             = dmc
NASM             = nasm-v30
DMC              = dmc
LIB_PROG         = dmc-lib

OBJFMT		 = obj

all: pictures $(LIB)

pictures:

disk: gruges.lec

$(LIB): $(OBJS_lib)
	$(LIB_PROG) -c $(@) $(^)

%.obj: %.asm
	$(NASM) -f$(OBJFMT) $(<) -o $(@)

%.obj : %.c
	$(DMC) -msd -Bf -2 -Ns -o+all -c $(<)

clean:
	-$(RM) *.obj *.OBJ .deps *.bak *.map $(LIB)

.PHONY: envoi all clean pictures dist
